using UnityEngine;
using System.Collections;

public class ShoppingScript : MonoBehaviour {
    
    public GUISkin skinShopping;
    public GUITexture backMenu;

    // Use this for initialization
    void Start(){

    }

    void OnGUI()
    {
        GUI.skin = skinShopping;
        Rect backMenuButton = new Rect((backMenu.transform.position.x * Screen.width) - ((backMenu.transform.lossyScale.x * Screen.width) / 2),
                                            Screen.height - (backMenu.transform.position.y * Screen.height) - ((backMenu.transform.lossyScale.y * Screen.height) / 2),
                                            backMenu.transform.lossyScale.x * Screen.width,
                                            backMenu.transform.lossyScale.y * Screen.height);
        if (GUI.Button(backMenuButton, ""))
        {
            Application.LoadLevel("menu");
        }

    }
}
